package com.genshang.restaurant.controller;


import com.genshang.restaurant.result.ResultBody;
import com.genshang.restaurant.service.ICustomerlistService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Alex
 * @since 2020-09-26
 */
@RestController
@RequestMapping("/customerlist")
public class CustomerlistController {

    @Autowired
    public ICustomerlistService customerlistService;

    /**
     * 2.4手动新增用户
     * @param userName
     * @param phone
     * @param gender
     * @param level
     * @param birthday
     * @return
     */
    @PostMapping("/addCustomer")
    public ResultBody addCustomer(String userName, String phone, String gender, String level, String birthday) {
        return customerlistService.addCustomer(userName, phone, gender, level, birthday);
    }
}
